package com.common.BearMethods;

import com.common.BearBean.BoDuanBean;
import com.common.BearBean.DaoGouPKBean;
import com.common.cons.Constans;
import com.common.retrofit.base.BaseMethods;
import com.common.utils.SortUtils;

import java.util.ArrayList;

import rx.Observable;
import rx.Subscriber;

public class GetDaoPKMethods extends BaseMethods {

    private static GetDaoPKMethods m_ins = null;

    public static GetDaoPKMethods getInstance() {
        if (m_ins == null) {
            synchronized (GetDaoPKMethods.class) {
                if (m_ins == null) {
                    m_ins = new GetDaoPKMethods();
                }
            }
        }
        return m_ins;
    }

    @Override
    protected String getHttpUrl() {
        return "api/Lists/";
    }

    private BearService initService() {
        return getRetrofit().create(BearService.class);
    }


    public void     daogouPK         (Subscriber<DaoGouPKBean> subscriber,
                      String uid ,
                      String hashid ) {
        String time  = System.currentTimeMillis()+"" ;
        Observable observable = initService().daogouPK (time,
                SortUtils.getMyHash("time"+time,"uid"+uid,"hashid"+hashid ), Constans.ANDROID_APP_ID,"3",
              uid,hashid
        );
        toSubscribe(observable, subscriber);
    }
}
